
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>IconFont</title>
    <link rel="stylesheet" href="demo.css">
    <script src="iconfont.js"></script>

    <style type="text/css">
        .icon {
          /* 通过设置 font-size 来改变图标大小 */
          width: 1em; height: 1em;
          /* 图标和文字相邻时，垂直对齐 */
          vertical-align: -0.15em;
          /* 通过设置 color 来改变 SVG 的颜色/fill */
          fill: currentColor;
          /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
             normalize.css 中也包含这行 */
          overflow: hidden;
        }

    </style>
</head>
<body>
    <div class="main markdown">
        <h1>IconFont 图标</h1>
        <ul class="icon_lists clear">
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-duidie"></use>
                    </svg>
                    <div class="name">堆叠</div>
                    <div class="fontclass">#el-icon-my-duidie</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fangxiang2"></use>
                    </svg>
                    <div class="name">方向2</div>
                    <div class="fontclass">#el-icon-my-fangxiang2</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fangxiang1"></use>
                    </svg>
                    <div class="name">方向1</div>
                    <div class="fontclass">#el-icon-my-fangxiang1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-liebiao"></use>
                    </svg>
                    <div class="name">列表</div>
                    <div class="fontclass">#el-icon-my-liebiao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-daochu"></use>
                    </svg>
                    <div class="name">导出</div>
                    <div class="fontclass">#el-icon-my-daochu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-daoru"></use>
                    </svg>
                    <div class="name">导入</div>
                    <div class="fontclass">#el-icon-my-daoru</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-suolvetu"></use>
                    </svg>
                    <div class="name">缩略图</div>
                    <div class="fontclass">#el-icon-my-suolvetu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-jiankanglv"></use>
                    </svg>
                    <div class="name">健康率</div>
                    <div class="fontclass">#el-icon-my-jiankanglv</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fangxiang-copy"></use>
                    </svg>
                    <div class="name">方向</div>
                    <div class="fontclass">#el-icon-my-fangxiang-copy</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-ie"></use>
                    </svg>
                    <div class="name">ie</div>
                    <div class="fontclass">#el-icon-my-ie</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-pdf"></use>
                    </svg>
                    <div class="name">PDF</div>
                    <div class="fontclass">#el-icon-my-pdf</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-zhuzhuangtu"></use>
                    </svg>
                    <div class="name">柱状图</div>
                    <div class="fontclass">#el-icon-my-zhuzhuangtu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fenxi"></use>
                    </svg>
                    <div class="name">分析</div>
                    <div class="fontclass">#el-icon-my-fenxi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-leidatu"></use>
                    </svg>
                    <div class="name">雷达图</div>
                    <div class="fontclass">#el-icon-my-leidatu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-zhuzhuangtu1"></use>
                    </svg>
                    <div class="name">柱状图</div>
                    <div class="fontclass">#el-icon-my-zhuzhuangtu1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-bingtu"></use>
                    </svg>
                    <div class="name">饼图</div>
                    <div class="fontclass">#el-icon-my-bingtu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-zhexiantu"></use>
                    </svg>
                    <div class="name">折线图</div>
                    <div class="fontclass">#el-icon-my-zhexiantu</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-yibiaopan"></use>
                    </svg>
                    <div class="name">仪表盘</div>
                    <div class="fontclass">#el-icon-my-yibiaopan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-notallcheck"></use>
                    </svg>
                    <div class="name">减</div>
                    <div class="fontclass">#el-icon-my-notallcheck</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-zujian"></use>
                    </svg>
                    <div class="name">06-组件</div>
                    <div class="fontclass">#el-icon-my-zujian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-dot"></use>
                    </svg>
                    <div class="name">点</div>
                    <div class="fontclass">#el-icon-my-dot</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-wenhao"></use>
                    </svg>
                    <div class="name">问号</div>
                    <div class="fontclass">#el-icon-my-wenhao</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-plus"></use>
                    </svg>
                    <div class="name">加号</div>
                    <div class="fontclass">#el-icon-my-plus</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-addition_fill"></use>
                    </svg>
                    <div class="name">addition_fill</div>
                    <div class="fontclass">#el-icon-my-addition_fill</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-computer"></use>
                    </svg>
                    <div class="name">computer</div>
                    <div class="fontclass">#el-icon-my-computer</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-createtask"></use>
                    </svg>
                    <div class="name">createtask</div>
                    <div class="fontclass">#el-icon-my-createtask</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-delete_fill"></use>
                    </svg>
                    <div class="name">delete_fill</div>
                    <div class="fontclass">#el-icon-my-delete_fill</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-document"></use>
                    </svg>
                    <div class="name">document</div>
                    <div class="fontclass">#el-icon-my-document</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-live"></use>
                    </svg>
                    <div class="name">live</div>
                    <div class="fontclass">#el-icon-my-live</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-mail"></use>
                    </svg>
                    <div class="name">mail</div>
                    <div class="fontclass">#el-icon-my-mail</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-offline_fill"></use>
                    </svg>
                    <div class="name">offline_fill</div>
                    <div class="fontclass">#el-icon-my-offline_fill</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-offline"></use>
                    </svg>
                    <div class="name">offline</div>
                    <div class="fontclass">#el-icon-my-offline</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-video"></use>
                    </svg>
                    <div class="name">video</div>
                    <div class="fontclass">#el-icon-my-video</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fengexian"></use>
                    </svg>
                    <div class="name">分隔线</div>
                    <div class="fontclass">#el-icon-my-fengexian</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-lishi"></use>
                    </svg>
                    <div class="name">历史</div>
                    <div class="fontclass">#el-icon-my-lishi</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fangxiang-copy1"></use>
                    </svg>
                    <div class="name">方向</div>
                    <div class="fontclass">#el-icon-my-fangxiang-copy1</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-baocun"></use>
                    </svg>
                    <div class="name">保存</div>
                    <div class="fontclass">#el-icon-my-baocun</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-404"></use>
                    </svg>
                    <div class="name">404</div>
                    <div class="fontclass">#el-icon-my-404</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-quanquan"></use>
                    </svg>
                    <div class="name">圈圈</div>
                    <div class="fontclass">#el-icon-my-quanquan</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-exit-fullscreen"></use>
                    </svg>
                    <div class="name">exit-fullscreen</div>
                    <div class="fontclass">#el-icon-my-exit-fullscreen</div>
                </li>
            
                <li>
                    <svg class="icon" aria-hidden="true">
                        <use xlink:href="#el-icon-my-fullscreen"></use>
                    </svg>
                    <div class="name">fullscreen</div>
                    <div class="fontclass">#el-icon-my-fullscreen</div>
                </li>
            
        </ul>


        <h2 id="symbol-">symbol引用</h2>
        <hr>

        <p>这是一种全新的使用方式，应该说这才是未来的主流，也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
        这种用法其实是做了一个svg的集合，与另外两种相比具有如下特点：</p>
        <ul>
          <li>支持多色图标了，不再受单色限制。</li>
          <li>通过一些技巧，支持像字体那样，通过<code>font-size</code>,<code>color</code>来调整样式。</li>
          <li>兼容性较差，支持 ie9+,及现代浏览器。</li>
          <li>浏览器渲染svg的性能一般，还不如png。</li>
        </ul>
        <p>使用步骤如下：</p>
        <h3 id="-symbol-">第一步：引入项目下面生成的symbol代码：</h3>
        <pre><code class="lang-js hljs javascript"><span class="hljs-comment">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;</span></code></pre>
        <h3 id="-css-">第二步：加入通用css代码（引入一次就行）：</h3>
        <pre><code class="lang-js hljs javascript">&lt;style type=<span class="hljs-string">"text/css"</span>&gt;
.icon {
   width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
   vertical-align: <span class="hljs-number">-0.15</span>em;
   fill: currentColor;
   overflow: hidden;
}
&lt;<span class="hljs-regexp">/style&gt;</span></code></pre>
        <h3 id="-">第三步：挑选相应图标并获取类名，应用于页面：</h3>
        <pre><code class="lang-js hljs javascript">&lt;svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>&gt;<span class="xml"><span class="hljs-tag">
  &lt;<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#el-icon-my-xxx"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">use</span>&gt;</span>
</span>&lt;<span class="hljs-regexp">/svg&gt;
        </span></code></pre>
    </div>
</body>
</html>
